import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import store from './redux/store';

const root = ReactDOM.createRoot(document.getElementById('root'));

// 全局监测 state 是否变化，如果变化就重新渲染 App
store.subscribe(() => {
  root.render(
    <App />
  );
});